import Vue from 'vue'
import VueRouter from 'vue-router'
import AddFamily from "../views/AddFamily";
import AddRelation from "../views/AddRelation";
import EditRelation from "../views/EditRelation";
import EditFamily from "../views/EditFamily";
import FindAmount from "../views/FindAmount";
import FindMoney from "../views/FindMoney";
import FindStudent from "../views/FindStudent";
import UpdateRelation from "../views/UpdateRelation";
import UpdateFamily from "../views/UpdateFamily";
import Index from "../views/Index";
import Login from "../views/Login";

import MyRelation from "../views/MyRelation";
import Student from "../views/Student";
import ChooseRelation from "../views/ChooseRelation";
import Pay from "../views/Pay";
import FindFamily from "../views/FindFamily";
import FindRelation from "../views/FindRelation";
import DeleteFamily from "../views/DeleteFamily";

import DeleteRelation from "../views/DeleteRelation";
import ShowRelation from "../views/ShowRelation";

import family_tree from "../views/family_tree.vue";  //组件导入

import keshihua from "../views/keshihua.vue";  //组件导入


import DeleteZupu from "../views/DeleteZupu";
import FindZupu from "../views/FindZupu";
import UpdateZupu from "../views/UpdateZupu";
import EditZupu from "../views/EditZupu";
import AddZupu from "../views/AddZupu";
import tree from "../views/tree";

import DeleteEvent from "../views/DeleteEvent";
import FindEvent from "../views/FindEvent";
import UpdateEvent from "../views/UpdateEvent";
import EditEvent from "../views/EditEvent";
import AddEvent from "../views/AddEvent";




Vue.use(VueRouter)

export const startLogin = [
  {
    path : '/',
    name : '登录',
    component : Login,
  }
]



export const adminLogin = [
  {
   
   
    
  
    path: '/Add',
    name:'家谱表',
    component: Index,
    children: [
     
      
      {
        path : '/AddZupu',
        name : '添加家谱信息',
        component : AddZupu,
      },


      {
        path:'/FindZupu',
        name:'查询家谱信息',
        component: FindZupu,
      },

      {
        path : '/DeleteZupu',
        name : '删除家谱信息',
        component: DeleteZupu,
      },

      {
        path: '/UpdateZupu',
        name:'更新家谱信息',
        component: UpdateZupu,
      },

    ]
  },






   {
    path : '/Add',
    name : '家谱人员表',
    component : Index,
    redirect : "/AddFamily",
    children : [
     {
        path : '/AddFamily',
        name : '添加家族成员信息',
        component : AddFamily,
      },


      {
        path:'/FindFamily',
        name:'查询家族成员信息',
        component: FindFamily,
      },

      {
        path : '/DeleteFamily',
        name : '删除家族成员信息',
        component: DeleteFamily,
      },

      {
        path: '/UpdateFamily',
        name:'更新家族成员信息',
        component: UpdateFamily,
      },
       ]
    },

 
    {
    path: '/delete',
    name : '人员关系表',
    component: Index,
    children: [
      
      {
        path : '/AddRelation',
        name : '添加家族成员关系',
        component : AddRelation,
     },


     {
      path:'/FindRelation',
      name:'查询家族成员关系',
      component: FindRelation,
      component: FindRelation,
      },
 
        {
       path: '/DeleteRelation',
       name : '删除家族成员关系',
        component: DeleteRelation,
      },


      {
        path: '/UpdateRelation',
         name:'更新家族成员关系',
         component: UpdateRelation,
      },

   
    ]
  },


  // {
  //   path: '/update',
  //   name:'家谱表',
  //   component: Index,
  //   children: [
     
      
  //     {
  //       path : '/AddZupu',
  //       name : '添加家谱信息',
  //       component : AddZupu,
  //     },


  //     {
  //       path:'/FindZupu',
  //       name:'查询家谱信息',
  //       component: FindZupu,
  //     },

  //     {
  //       path : '/DeleteZupu',
  //       name : '删除家谱信息',
  //       component: DeleteZupu,
  //     },

  //     {
  //       path: '/UpdateZupu',
  //       name:'更新家谱信息',
  //       component: UpdateZupu,
  //     },

  //   ]
  // },

   
  {
    path: '/find',
    name : '人员事件表',
    component: Index,
    children: [
    
   //   {
   //     path: '/FindAmount',
   //     name : '查询账目信息',
   //     component: FindAmount,
   //   },
     
   //   {
   //     path: '/FindStudent',
   //     name:'查询学生信息',
   //     component: FindStudent,
   //   },
     
    //  {
    //    path:'/FindMoney',
   //     name:'查询催费信息',
   //     component: FindMoney,
   //   },

       
   {
    path : '/AddEvent',
    name : '添加事件信息',
    component : AddEvent,
  },


  {
    path:'/FindEvent',
    name:'查询事件信息',
    component: FindEvent,
  },



  {
    path : '/DeleteEvent',
    name : '删除事件信息',
    component: DeleteEvent,
  },

  {
    path: '/UpdateEvent',
    name:'更新事件信息',
    component: UpdateEvent,
  },
   
  
   
    ]
  },

 
  {
    path: '/find',
    name : '可视化',
    component: Index,
    children: [
      {
        path: '/keshihua',
        name : '关系可视化',
        component: keshihua,
       
      },

      {
        path: '/tree',
        name : '族谱可视化',
        component: tree,
       
      }
   
    ]
  },





  

]

export const studentLogin = [
  {
    path : '/Find',
    name : '查询',
    component : Student,
    redirect:'/MyRelation',
    children : [
      // {
      //   path : '/MyRelation',
      //   name : '我的课表',
      //   component : MyRelation,

      // },
      {
        path: '/family_tree',
        name : '制作家谱',
        component: family_tree,
       
      },




    
     





    ]
  },



  {
    path: '/choose',
    name: '查询家族成员关系',
    component: Student,
    children: [
 
         
      {
        path:'/FindFamily',
        name:'成员信息展示',
        component: FindFamily,
      },
     
    
     



      {
        path: '/ChooseRelation',
        name: '',
        component: ChooseRelation,
      }
      
    
    





    ]
  },



  // {
  //   path: '/pay',
  //   name:'自助缴费',
  //   component: Student,
  //   children: [
    
  //     {
  //       path: '/Pay',
  //       name: '课程缴费',
  //       component: Pay,
  //     }
  //   ]
  // }




]



const router = new VueRouter({
  mode: 'hash',
  routes :startLogin
})

export default router

// export default new Router({
//   routes: [
//     {
//       path: '/',//自定义你的页面路径
//       name: '登录',//起个名字
//       component: Login//引用的组件名
//     },
//     {
//       path: '/login',//登录页面，同上
//       name: '登录',
//       component: Login//使用登录组件
//     },
//     {
//       path: '/Student',//
//       name: '选择课程',
//       component: Student,
//       children : [
//         {
//           path : '/StudentChoose',
//           name : '学生选择课程',
//           component : StudentChoose,
//         }
//       ]
//     },
//   ]
// })
